import Vue from 'vue'
import App from './App.vue'
import router from './router'
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import '../src/assets/global.css'
import request from "@/utils/request";
import store from "@/store";
import * as echarts from 'echarts' //引入echarts

import VueAMap from '@vuemap/vue-amap';
import '@vuemap/vue-amap/dist/style.css';

Vue.use(VueAMap);
VueAMap.initAMapApiLoader({
  // 高德官网示例的key
  key: 'd9688ec7d9bb29c4b3c725fc777c1ff3',
  securityJsCode:'e7a2f1ba08f22cb6fc9837e600eadd80',
  // 自2021年12月02日升级，升级之后所申请的 key 必须配备安全密钥 jscode 一起使用
  // key: '高德的key',
  // securityJsCode: '对应的安全秘钥',
  plugins: [
    'AMap.Geocoder',
  ]
});


Vue.prototype.$echarts = echarts //注册组件

Vue.config.productionTip = false

Vue.use(ElementUI);

Vue.prototype.request = request

new Vue({
  router,
  store,
  render: h => h(App),
  beforeCreate() {
    Vue.prototype.$bus = this //安装全局事件总线
  },
}).$mount('#app')
